package comm.suger.web;

import java.util.Date;

/**
 * @ClassName: Constant
 * @Description: 系统常量类
 * @author Lanxiaowei
 * @date 2014-2-23 下午2:58:49
 */
public class Constant {
	public static final int PAGESIZE = 10;          //每页显示条数
	public static final int TOPAGE = 1;            //默认第一页
	public static final int BUFFER_SIZE = 20 * 1024; //默认缓冲区大小20KB
	public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd"; //缺省的日期格式
	public static final String SYS_CURRENTUSER = "currentUser";  //系统当前用户
	public static final String VALIDATE_CODE = "validateCode";      //验证码
	public static final String USER_RESOURCES = "USERRESOURCE";     //当前登录用户的所有权限
	public static final String DEFAULT_PASSWORD = "123456";         //初始默认密码
	public static final Date BASE_DATE = new Date(0);              //基准时间：1970年01月01日 00:00:00
	public static final String DEFAULT_CHARSET = "UTF-8";          //默认字符编码
	/**HTML文档类型声明*/
	public static final String HTML_DOCTYPY = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
    
    public static final String USER_AGENT = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0";
    
    public static final String[] PATTERNS = new String[] {
    	"yyyy-MM-dd", 
    	"yyyy-MM-dd HH:mm",
    	"yyyy-MM-dd HH:mm:ss",
    	"yyyy/MM/dd",
    	"yyyy/MM/dd HH:mm",
    	"yyyy/MM/dd HH:mm:ss",
    	"M/dd/yyyy",
    	"M/d/yyyy",
    	"MM/d/yyyy",
    	"MM/dd/yyyy",
    	"MM/dd/yyyy HH:mm",
    	"MM/dd/yyyy HH:mm:ss",
    	"HH:mm:ss",
    	"HH:mm",
    };
	
	/**日期格式*/
	public static final String DATE_DEFAULT_PATTERN = "yyyy-MM-dd";
	public static final String DATETIME_DEFAULT_PATTERN = "yyyy-MM-dd HH:mm:ss";
	
	/**文件分隔符*/
	public static final String FILE_SEPARATOR = System.getProperty("file.separator");
	/**路径分隔符*/
	public static final String PATH_SEPARATOR = System.getProperty("path.separator");
	/**行分隔符*/
	public static final String LINE_SEPARATOR = System.getProperty("line.separator");
	/**Java运行环境版本*/
	public static final String JAVE_VERSION = System.getProperty("java.version");
	/**Java安装路径*/
	public static final String JAVE_HOME = System.getProperty("java.home");
	/**当前操作系统名称*/
	public static final String OS_NAME = System.getProperty("os.name");
	/**当前操作系统版本*/
	public static final String OS_VERSION = System.getProperty("os.version");
	/**当前操作系统用户*/
	public static final String OS_USER_NAME = System.getProperty("user.name");
	/**当前操作系统用户主目录*/
	public static final String OS_USER_HOME = System.getProperty("user.home");
	/**当前操作系统用户工作主目录*/
	public static final String OS_USER_DIR = System.getProperty("user.dir");
}
